package com.ropeok.controller;

import com.ropeok.Result.Result;
import com.ropeok.entity.permission;
import com.ropeok.service.PermissionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@Slf4j
@RequestMapping("/permission")
public class PermissionController {

    @Autowired
    private PermissionService permissionService;

    @PostMapping(value ="/add")
    public Result SaveUser(permission permission){
        permissionService.SavePermission(permission);
        return Result.success();
    }
}
